Databases frequently store large quantities of data in an organized fashion. Although databases may store a wide variety of different types of data, one example of a database that stores a substantial quantity of data may be a database that stores medical records. A database may be queried in order to identify data stored within the database or information regarding the data stored by the database. As such, a database query may return database search results responsive to the query. In this regard, in response to receipt of a database query, the database is reviewed and data or other information that is responsive to the database query may be provided. The process of responding to a database query therefore consumes processing time and processing resources.
To avoid unnecessarily expending processing time and processing resources in an instance in which a database query is repeated, particularly in an instance in which the database has not been updated since the same database query was previously processed, records may be maintained of the database search results. As such, in instances in which the same database query is repeated, the record that includes the database search results for the prior database query may be provided in a more timely and efficient manner without having to again consume the processing time and processing resources that would otherwise be required to review the database in response to the same database query.
The records of the database search results may be maintained in memory, such as a cache. Because a database may be repeatedly queried and/or because the database search results for database queries may be sizable, the records stored by the cache and, as a result, the size of the cache may become larger than is desired. In some instances, the cache may become so large that the performance of the cache is adversely impacted. As such, techniques have been developed in order to delete records from the cache in an instance in which the cache exceeds a predefined size. In this regard, in an instance in which the cache exceeds the predefined size, records may be deleted in accordance with a least recently used (LRU) technique in which the least recently used records are initially deleted, a least frequently used (LFU) technique in which the least frequently used records are initially deleted or an adaptive replacement cache (ARC) technique. In each of these techniques, the records are deleted until the cache is within the bounds established by the predefined size.